<template>
  <div id="app">
     <dl-item :name="obj.name" :num="obj.num" :price="obj.price" :url="obj.url"></dl-item>
  </div>
</template>

<script>
import dlItem from './components/dl-item'
export default {
  name: 'App',
  created(){
     this.$bus.$on('count',(num) => {
         this.obj.num = num;
     }) 
  },
  data(){
      return {
          obj:{
              name:"商品一",
              price:12,
              num:20,
              url:'../static/logo.png'
          }
      }
  },
  components: {
    dlItem
  },
  methods:{
      
  }
}
</script>

<style lang="scss">
    *{
        margin: 0;
        padding:0;
        list-style: none;
        box-sizing: border-box;
    }
    html,body,#app{
        width:100%;
        height: 100%;
        overflow: hidden;
    }
    #app{
        display: flex;
        flex-direction: column;
        .header{
            width:100%;
            height: 44px;
            background: pink;
        }
        .con{
            width:100%;
            flex:1;
            display: flex;
            .left{
                width:80px;
                height:100%;
                border-right:1px solid gray;
                flex-shrink: 0;
                li{
                    width:100%;
                    height: 44px;
                    border-bottom:1px solid gray;
                    &.active{
                        color:red;
                    }
                }
            }
            .right{
                flex:1;
                height: 100%;
                background: lightblue;
                img{
                    width:100%;
                }
            }
        }
    }
</style>
